﻿////////////////////////////////////////////////////////////////////////
//Autor: Gabriel Tame Borao  - gabrieltame@yahoo.es 
//Fecha: 2010/09/15 01:26
//Solucion: GTameReport.sln
//Proyecto: GTameReport
//Fichero: ActionType.cs
//
//	Copyright (C) 2010  Gabriel Tame Borao (GTB)
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
namespace GTameReport
{
    using Rdl;
    using System;
    using System.Collections;

    public class ActionType
    {
        private string _BookmarkLink;
        private GTameReport.DrillthroughType _Drillthrough;
        private string _Hyperlink;
        private string _Label;

        public Rdl.ActionType Write()
        {
            Rdl.ActionType type = new Rdl.ActionType();
            ArrayList list = new ArrayList();
            ArrayList list2 = new ArrayList();
            if (this._BookmarkLink != null)
            {
                list.Add(this._BookmarkLink);
                list2.Add(ItemsChoiceType8.BookmarkLink);
            }
            if (this._Drillthrough != null)
            {
                list.Add(this._Drillthrough.Write());
                list2.Add(ItemsChoiceType8.Drillthrough);
            }
            if (this._Hyperlink != null)
            {
                list.Add(this._Hyperlink);
                list2.Add(ItemsChoiceType8.Hyperlink);
            }
            if (this._Label != null)
            {
                list.Add(this._Label);
                list2.Add(ItemsChoiceType8.Label);
            }
            type.Items = list.ToArray();
            type.ItemsElementName = (ItemsChoiceType8[]) list2.ToArray(typeof(ItemsChoiceType8));
            list2 = null;
            list = null;
            return type;
        }

        public string BookmarkLink
        {
            get
            {
                return this._BookmarkLink;
            }
            set
            {
                this._BookmarkLink = value;
            }
        }

        public GTameReport.DrillthroughType Drillthrough
        {
            get
            {
                if (this._Drillthrough == null)
                {
                    this._Drillthrough = new GTameReport.DrillthroughType();
                }
                return this._Drillthrough;
            }
            set
            {
                this._Drillthrough = value;
            }
        }

        public string Hyperlink
        {
            get
            {
                return this._Hyperlink;
            }
            set
            {
                this._Hyperlink = value;
            }
        }

        public string Label
        {
            get
            {
                return this._Label;
            }
            set
            {
                this._Label = value;
            }
        }
    }
}

